package com.amit.hibernate1;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;

public class Lab1Client2 
{

	public static void main(String[] args) {
		
		
	SessionFactory sessionFactory=CHibernateUtil.getfactory();
	Session session=sessionFactory.openSession();
	
	Transaction tx=session.beginTransaction();
	
	Customer cust=(Customer) session.load(Customer.class, 1);
	
	System.out.println(cust.getCid()+" "+cust.getCname()+" "+cust.getEmail()+" "+cust.getBal()+" "+cust.getCity()+" "+cust.getPhone());
	
	tx.commit();
	session.close();
	

	}

}
